package com.geek.water.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @author yangwenqi
 * @decs TODO
 * @date 2025/7/25
 */


@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("customer")
@ApiModel(description = "客户主体表")
public class Customer implements Serializable {
    @ApiModelProperty("主键，自增客户ID")
    @TableId(type = IdType.AUTO)
    private Long id;


    @TableField("name")
    @ApiModelProperty("客户名称")
    private String name;


    @TableField("credit_code")
    @ApiModelProperty("统一社会信用代码")
    private String creditCode;


    @ApiModelProperty("账号状态：active-正常, suspended-停用")
    @TableField("status")
    private String status;


    @TableField("contact")
    @ApiModelProperty("联系人姓名")
    private String contact;


    @TableField("contact_phone")
    @ApiModelProperty("联系电话")
    private String contactPhone;


    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty("创建时间")
    private LocalDateTime createdAt;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty("更新时间")
    private LocalDateTime updatedAt;

    @TableField(exist = false)
    private List<Site> sites;

}